if [ -n "`which include.sh`" ]; then echo "including `which include.sh`";. `which include.sh`; fi
local_path=`dirname ${0}`

function start_users()
{
local users_list="$1"
for i in $users_list
do
    echo "sudo passwd -u $i"
    sudo passwd -u $i
done

}

function stop_users()
{
local users_list="$1"
for i in $users_list
do
    echo "sudo passwd -l $i"
    sudo passwd -l $i
done
}



function start-users-mannul.sh()
{
    default_users="application  comm  compiler  driver iqoouser mmedia  setting  system"
    local part=
    users_list=`question  "请输入需要停用的帐号："  2  "$default_users"`
    start_users "$users_list"
}

function stop-users-mannul.sh()
{
    default_users="application  comm  compiler  driver iqoouser mmedia  setting  system"
    local part=
    users_list=`question  "请输入需要停用的帐号："  2  "$default_users"`
    stop_users "$users_list"
}



function setup-auto.sh()
{
    menu_list="application  comm  compiler  driver iqoouser mmedia  setting  system"
}

#脚步入口：解析参数
while test $# != 0
do
    case $1 in
	-r)
	    shift
	    version=$1
	    ;;
	-m)
	    shift
	    mode=$1
	    ;;
        *)
	    mode=$1
	    ;;
       esac
       shift
done

if [ "$mode" == "auto" ]; then
    echo "auto"
    setup-mediawiki.sh
    setup-trac.sh
else
    menu_list="start-users-mannul.sh stop-users-mannul.sh setup-auto.sh"
    echoTextBlue "Please select"
    result=`sh_menu_select "$menu_list"`
    echo "${result}"
    ${result}
fi



